import Vue from "vue";
import Vuex from "vuex";
import products from './products'
import locations from './locations'
import caozuos from './caozuos'
import reasons from './reasons'
import remens from "./remens";
Vue.use(Vuex)

export default new  Vuex.Store({
    state:{
      isCollapse:false,
        res1:[],
        res1_sign:false,
        search_word:'',

    },
    mutations:{
        CollapseMenu(state){
            state.isCollapse = !state.isCollapse
        },
        update_res(state, res1){
            state.res1 = res1
            state.res1_sign = true
        },
        update_search(state, keyword){
            state.search_word = keyword
        },

    },
    modules: {
        products,
        locations,
        caozuos,
        reasons,
        remens
      }
})